begintownscript;

variables;
//

int i,j,k,choice;
body;

beginstate 0;

break;

beginstate 1;

break;

beginstate 2;

break;

beginstate 57;
if (get_flag(175,4) == 1)
end();
reset_dialog();
add_dialog_str(0,"You are standing in front of the Vahnatai's controls - the one thing which can be used to stop their invasion. Do you smash them?",0);
add_dialog_choice(0,"Leave it Alone");	
add_dialog_choice(1,"Smash the Controls");
choice = run_dialog(1);
if (choice == 1)
end();
if (choice == 2)
set_state_continue(58);
break;

beginstate 58;
message_dialog("You smash the controls to the power, and the hum stops immediately. However, it does not do as expected. The entire floor begins to shake, and you look around nervously.","");
message_dialog("The shaking intensifies, and you fall to the ground. When you wake you find yourselves standing in front of the control panel, still deciding what to do with it.","What happened?");
set_flag(175,4,1);
set_flag(67,1,1);
message_dialog("(You have just *forgotten* what happened.","Well, your characers have, and you should just pretend to.");
break;

//beginstate 56;
//if (get_flag(6,7) < 1){  message_dialog("You enter the final Tower of the Vahnatai, only to find it a Pit. Two ranks of Spirits guard it, as well as several Zombie Dragons. It looks like the fighting's going to get even tougher!","");  set_flag(6,7,1);}
//break;

beginstate 67;
if (get_flag(25,5) < 1){  message_dialog("You come face to face with Rentar Ihrno - again. This time she's really here, and she doesn't look happy.","");  set_flag(25,5,1);}
break;

beginstate 65;
if (get_flag(30,0) == 1){  message_dialog("You blink. Just as you had dealt Rentar-Inro a killing blow, she disappeared. No trace of her body remains. You are sure that using powerful Vahnatai magic, she will soon be able to bother you again. For now at least, she's gone","");  set_flag(30,0,0);}
break;

beginstate 13;
change_outdoor_location(1,2,26,2);
break;

beginstate 77;
if (get_flag(67,1) == 0){ message_dialog("You step towards the exit, and at once begin to feel queasy. Something's wrong...",""); change_outdoor_location(27,1,5,24);} 
break;